/**
 * Sonar iOS Client Application
 * Extension for Sonar, open source software quality management tool.
 * Copyright (C) 2011 Maris Plots
 * mailto: maris.plots@gmail.com
 *
 * Sonar iOS Client Application is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * Sonar iOS Client Application is distributed in the hope that it will be 
 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with Sonar iOS Client Application; if not, write to the Free 
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
 */

#import "NSString+SonarAdditions.h"
#import "NSString+SonarAdditionsTests.h"

@implementation NSString_SonarAdditionsTests

#pragma mark -
#pragma mark sonar_capitalizeFirstLetter tests
#pragma mark -
- (void)testCapitalizeFirstLetterCase1{
    NSString *test = [@"abc" sonar_capitalizeFirstLetter];
    NSString *message = @"First letter should be capitalized";
    STAssertTrue([test isEqualToString:@"Abc"], message);
}

- (void)testCapitalizeFirstLetterCase2{
    NSString *test = [@"aBc" sonar_capitalizeFirstLetter];
    NSString *message = @"First letter should be capitalized";
    STAssertTrue([test isEqualToString:@"ABc"], message);
}

- (void)testCapitalizeFirstLetterCase3{
    NSString *test = [@"i" sonar_capitalizeFirstLetter];
    NSString *message = @"Only letter should be capitalized";
    STAssertTrue([test isEqualToString:@"I"], message);    
}

- (void)testCapitalizeFirstLetterCase4{
    NSString *test = [@"1" sonar_capitalizeFirstLetter];
    NSString *message = @"Numbers should not be changed";
    STAssertTrue([test isEqualToString:@"1"], message);        
}

- (void)testCapitalizeFirstLetterCase5{
    NSString *test = [@"ž" sonar_capitalizeFirstLetter];
    NSString *message = @"All unicode characters should be capitalized";
    STAssertTrue([test isEqualToString:@"Ž"], message);        
}

- (void)testCapitalizeFirstLetterCase6{
    NSString *test = [@"*@£@!" sonar_capitalizeFirstLetter];
    NSString *message = @"Symbols should not be changed";
    STAssertTrue([test isEqualToString:@"*@£@!"], message);        
}

@end
